﻿using is_it_messy;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FileExplorer
{
    class Search
    {
        public static List<FileData> SearchFromPath(String startPath, String key)
        {
            List<FileData> resultSet = new List<FileData>();
            List<FileData> allFiles = Util.GetFilesInfo(startPath);
            foreach(FileData File in allFiles)
            {
                if (File.FileName.Contains(key))
                {
                    resultSet.Add(File);
                }
            }
            return resultSet;
        }
    }
}
